import { createApp } from 'vue'
import App from './App.vue'
import ElementPlus from 'element-plus'
// import { axios } from './components/js/axios.js'
import router from './router/index.js'
import './assets/scss/reset.css'
// import './assets/scss/element-variables.scss'
import 'element-plus/lib/theme-chalk/index.css'
import './assets/scss/elementPlusReset.scss'
import 'dayjs/locale/zh-cn'
import locale from 'element-plus/lib/locale/lang/zh-cn'
import store from './store'

// window.$http = axios
// 公用组件
import layout from '@common/base/layout.vue'
import card from '@common/base/card.vue'
import formitems from '@common/base/formitems.vue'
import forms from '@common/base/forms.vue'
import table from '@common/base/table.vue'
import dialog from '@common/base/dialog.vue'
const components = [layout, card, formitems, forms, table, dialog]

const app = createApp(App)
components.forEach(component => {
  app.component(component.name, component)
})

app.use(ElementPlus, { locale }).use(store).use(router).mount('#app')
